home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
tcp_ip
/
watchdg2
/
watchdog.doc
< prev
next >
Wrap
Text File
|
1992-11-01
|
5KB
|
139 lines
Introduction
This is a watchdog reset circuit that works off of the serial
data line between a PC and a TNC. The watchdog resets itself
whenever it sees activity on the transmit data line (indicating
NOS or your BBS software is alive and kicking). If there is no
activity over a very long period of time (on the order of tens
of minutes), the circuit will switch a transistor on to trigger
whatever circuitry you wish. Usually this will be connected to
your CPU reset switch. The circuit differs from the traditional
555 watchdog timer because such timers would require an
extremely large value resistor and capacitor in the RC network
to achieve very long timeouts. Adjusting the timeout interval
in such a circuit would also require a lot of patience. Instead,
this circuit uses a binary counter as the timer. The circuit
can be assembled using readily available parts and may be
adjusted quickly using an audio frequency counter.
Circuit Description
U1 operates as a counter with an internal oscillator whose time
constant is determined by R1 and C1. Positive pulses from the
serial data line pass through R3 to pin 12 setting the counter
to zero. D1, D2, and R3 limit the reset voltage between 0 and 5
volts. R4 is a pull-down resistor to enable counting when the
data line is disconnected for testing. When there is no
activity on the serial line for a long time, U1 counts until pin
3 eventually goes high. C2 charges through R5 producing a brief
output pulse that triggers FET Q1 which resets the computer. D3
allows rapid discharge of C2 and prevents reverse bias on Q1
when the counter is reset. C3 serves as a power-supply
decoupling capacitor.
Parts List
Circuit components
R1 1 Meg ohms, potentiometer
R2 47 K ohms, 1/4 watt
R3 15 K ohms, 1/4 watt
R4,R5 100 K ohms, 1/4 watt
C1,C2 .33 microfarad, ceramic disc
C3 .1 microfarad, ceramic or tantalum
D1,D2,D3 1N4148, general purpose diode
Q1 VN10KM, enhancement-mode N-channel MOSFET
U1 4060, CMOS binary counter
Hardware
IBM PC board
16-pin IC socket
Two sets of connectors: one for the reset line, the other for
the serial port.
The most expensive part of this project is the PC bus perfboard.
The other parts are relatively inexpensive. Virtually all parts
are available from a good electronics store, except possibly Q1
(TAPR sells VN10KMs for about a $1.00 each). Note that you can
use any reasonable substitute FET for Q1 as long as can trigger
it from a 5-volt CMOS output line.
Assembly Notes
A 5-volt source is available from pin B3 of a PC ISA bus. Pin
B1 is ground. You can also use this circuit in a different type
of computer in which case the power supply pinouts will be
different on the bus.
R1 should be mounted in a way that makes it easy to adjust and
measure the frequency when the board is inside your PC.
Do not hard-wire the watchdog board to either your serial line
or your reset-switch. It will be more convenient to use
connectors of some sort. If you use a DB-25/DB-9 to RJ-11
adapter on the serial port, then a RJ-11 Y-connector makes for a
convenient way to tap into your serial line.
The reset switch in most PCs simply grounds a capacitor on the
motherboard. The capacitor side of the switch should connect to
the drain of Q1. The ground side connects to the source of Q1.
Installation and Testing
( ) Ensure the computer is off and IC U1 is NOT installed in
its socket. Insert the board into a convenient slot on the PC
motherboard. Do not connect the reset line or serial line at
this time. Power up the computer and check for 5 volts at pin
16 of the IC socket.
( ) Connect the reset line to the board. Place a temporary
jumper between pin 16 and pin 3 of the U1 socket and check that
your computer performs a hard reset.
( ) Power down. Remove the jumper between pin 16 and pin 3 and
insert U1 into its socket. Adjust R1 to mid-range. Power up
and check pins 11 and 7 of U1 for signs of oscillation with a
voltmeter or logic probe.
( ) Connect the serial line and check pin 7. It should
continue to pulse.
( ) Place a temporary jumper across D1 and make sure pin 7
STOPS pulsing. Remove the jumper.
( ) Attach a frequency counter to pin 11 of U1. The frequency
at pin 3 of U1 will be the oscillator frequency divided by 2^14.
But Q1 triggers after only a half period when pin 3 goes high.
Hence the oscillator frequency at pin 11 should be
f=(2^14)/(t*120) where t is the desired timeout value in minutes
and f is in hertz. Adjust R1 for the desired frequency.
Accompanying Schematic Files
WATCHDOG.SCH ORCAD schematic
WATCHDOG.PS PostScript output
WATCHDOG.PCL HP PCL (Laserjet) output
WATCHDOG.HGL HP Graphics Language (plotter) output
Some ideas for improvement
You may want to parallel a touch-tone decoder reset line with
Q1. This gives you a fail-safe method of resetting NOS if it
decides to lock up your computer but still send garbage through
the serial port.
Because the 4060 is a ripple counter, it is possible (although I
think unlikely) that the circuit will cause an inadvertent
reset.
Questions and comments about this circuit may be e-mailed to me.
Antonio Querubin
AH6BW
tony@mpg.phys.hawaii.edu
ah6bw@ah6bw.ampr.org